<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        h1 {
            text-align: center;
        }

        table {
            height: 80px;
        }

        th {
            padding-left: 20px;
            padding-right: 20px;
        }

        table,
        th,
        td {
            /* 双线框变单线框 */
            border-collapse: collapse;
            border: 1px solid #111;
            margin: 0 auto;
            text-align: center;
        }
    </style>
</head>

<body>
    <h1>订单确认</h1>
    <script>
        // 输入信息
        let num = +prompt("请输入商品数量");
        let price = +prompt("请输入商品价格");
        let address = prompt("请输入收货地址");
        console.log(name + " " + " " + price + "" + address);
        // 计算价格
        let total = price * num;
        //打印信息
        document.write(` <table>
        <tr>
            <th>商品名称</td>
            <th>商品价格</td>
            <th>商品数量</td>
            <th>总价</td>
            <th>收货地址</td>
        </tr>
        <tr>
            <td>小米手机青春plus</td>
            <td>${price}元</td>
            <td>${num}10</td>
            <td>${total}元</td>
            <td>${address}</td>
        </tr>
    </table>`);
    </script>
</body>

</html>